<?php

namespace App\Models\SystemManagement;

use App\Models\CommonModel;
use App\Models\Constant\Fields;
use Illuminate\Database\Eloquent\Model;

class UserPost extends CommonModel
{
    protected $table = 'user_posts';

    protected $hidden = ['deleted_at','created_at','updated_at'];

    function post(){
        return $this->belongsTo(self::$SYSTEM.'\Post',Fields::POST_ID,Fields::ID)
            ->select('id','name');
    }
}
